Page({
  data: {
    info1:"",
    info2:"",
    sum:""
  },
  user_input1(e){
    this.setData({
      info1:parseInt(e.detail.value)
    })
  },
  user_input2(e){
    this.setData({
      info2:parseInt(e.detail.value)
    })
  },
  add(){
    var sum = this.data.info1 + this.data.info2
    this.setData({
      sum:sum
    })
  },
  reduce(){
    var sum = this.data.info1 - this.data.info2
    this.setData({
      sum:sum
    })
  },
  cheng(){
    var sum = this.data.info1 * this.data.info2
    this.setData({
      sum:sum
    })
  },
  chu(){
    var sum = this.data.info1 / this.data.info2
    this.setData({
      sum:sum
    })
  },
  onLoad(options) {
  }
})